The present invention relates to a signal generating apparatus for generating a signal on the basis of specific sampling data and differential wave data stored in wave storage means, and a signal generating method therefor.
Conventional electronic instruments have musical tone signal generating apparatus. This musical tone signal generating apparatus generates a musical tone signal on the basis of wave data stored in a wave memory. For example, wave data of PCM format are stored in the wave memory. The wave data of PCM format are prepared by sampling a musical tone wave at a predetermined frequency, quantizing the sampling data and further coding the quantized data. The wave data of PCM format are consecutively read out from the wave memory according to tone-generating instructions, and a musical tone signal is generated on the basis of the wave data which have been read out.
In the musical tone signal generating apparatus, for generating musical tone signals corresponding to a great number of timbres, it is required to store a vast amount of wave data of PCM format in the wave memory. For decreasing the amount of the wave data, there is therefore employed, for example, a coding technique such as a DPCM (Differential Pulse Code Modulation) method and an ADPCM (Adaptive Differential Pulse Code Modulation) method. In these methods, for example, wave data of PCM format is converted to differential wave data and stored in the wave memory. And, when a musical tone is generated, the differential wave data from the wave memory is accumulated, and reproduced into the original wave data of PCM format.
For decreasing the amount of wave data to be stored in the wave memory, the following method is also generally employed. For example, as shown in FIG. 6, only wave data in a predetermined section (attack section) of the head of a musical tone wave and wave data in a predetermined section (repeat section) of the musical tone wave subsequent thereto are stored in the wave memory. When a musical tone signal is generated, the wave data of the attack section are read out from its top once, and thereafter, the wave data of the repeat section are repeatedly read out. The musical tone signal generating apparatus generates musical tone signals on the basis of these wave data which have been read out.
However, the above DPCM method and ADPCM method have been scarcely employed for musical tone signal generating apparatus of electronic musical instruments. That is because errors caused by preparing differential wave data of DPCM or ADPCM format are accumulated when the differential wave data of the repeat section are repeatedly accumulated.
Although having the above problem, the ADPCM method or the DPCM method is vigorously studied since the amount of the wave data can be decreased. For example, U.S. Pat. No. 4,916,996, corresponding to JP-A-62-242995, discloses "musical tone generating apparatus with reduced data storage requirements" for overcoming the above problem.
In the above musical tone generating apparatus, the wave memory (ADPCM data memory 2) stores differential wave data alone. When the differential wave data are read out for the first time, the wave data (PCM code) obtained by accumulating the final differential wave data of the attack section is latched. In the above musical tone generating apparatus, when the differential wave data at the top of the repeat section is read out subsequently to the final differential wave data of the repeat section, the differential wave data at the top of the repeat section is accumulated on the previously latched wave data, thereby to reproduce PCM code.
One variant of the musical tone generating apparatus disclosed in U.S. Pat. No. 4,916,996 is provided with a memory in place of the above latch. This memory stores wave data (PCM code) equivalent to the wave data (PCM code) to be obtained by accumulating the final differential wave data of the attack section. When the differential wave data at the top of the repeat section is read out subsequently to the final differential wave data of the repeat section, the differential wave data at the top of the repeat section is accumulated on the wave data (PCM code) stored in the memory, thereby to reproduce wave data (PCM code).
In the musical tone generating apparatus and the variant thereof disclosed in U.S. Pat. No. 4,916,996, the errors accumulated within the attack section cannot be removed. Further, when the differential wave data of the attack section and those of the repeat section are read only once, the accumulated errors cannot be removed. Further, the above musical tone generating apparatus has a defect in that its circuit is complicated since the apparatus is required to have latches 206, 218 for storing the wave data (d(n), E(n)+e.gamma.(n)) obtained by accumulating the final differential wave data of the attack section. The above variant has a defect in that its circuit is complicated since the apparatus is required to have memories 206A, 218A for storing wave data (PCM code) equivalent to the wave data to be obtained by accumulating the final differential wave data of the attack section.